package cn.klaw.flowable.enums;

/**
 * 打印条件
 *
 *
 * @version: V3.1.0
 *
 * @date ：2022/6/14 16:50
 */
public enum PrintEnum {
    /**
     * 不限制
     */
    unconditional(1, "不限制"),
    /**
     * 节点结束
     */
    nodeEnd(2, "节点结束"),
    /**
     * 流程结束
     */
    flowEnd(3, "流程结束"),
    /**
     * 条件设置
     */
    conditions(4, "条件设置");

    private int code;
    private String message;

    PrintEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 根据状态code获取枚举名称
     *
     * @return
     */
    public static PrintEnum getByCode(Integer code) {
        for (PrintEnum status : PrintEnum.values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
